package com.lee.serviceagent.ocr.tesseract;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author lee
 * @description class
 * @date 2025/8/19 上午10:45
 */
public class InfoExtractor {
    public String extractIDNumber(String text) {
        Pattern pattern = Pattern.compile("[0-9]{18}|[0-9]{15}");
        Matcher matcher = pattern.matcher(text);
        if (matcher.find()) {
            return matcher.group();
        }

        return null;
    }
    //可以添加其他方法来提取不同的信息，例如营业执照号等
}
